#!/usr/bin/python

# Get the instance by its key

from pyodm.document import Document
from pyodm.fields import *
import sys

class TestDocument(Document):
    field1 = StringField()
    field2 = IntegerField()

obj = TestDocument.getByKey(sys.argv[1])
print obj.getKey()
print obj.field1
print obj.field2
